/*
 * note.h
 *
 *  Created on: Mar 14, 2013
 *      Author: Vincent
 */

#ifndef NOTE_H_
#define NOTE_H_

typedef enum {
        Pitch_E4 = 0x05,
        Pitch_G4 = 0x09,
        Pitch_C4 = 0x02,
        Pitch_F4 = 0x06,
        Pitch_D4 = 0x03,
        Pitch_00 = 0x00
} Pitch;

typedef enum {
        Duration_Quarter = 0x07,
        Duration_Half = 0x09,
        Duration_Whole = 0x0B,
        Delay_60 = 60,
        Delay_70 = 70,
        Delay_80 = 80,
        Delay_90 = 90,
        Delay_100 = 100,
        Delay_110 = 110,
        Delay_120 = 120
} Duration;

typedef struct {
        Pitch p;
        Duration d;
} Note;

Note create_note(Pitch p, Duration d);
void set_pitch (Note newnote);
void set_duration (Note newnote);
void set_delay (int bpm);

#endif /* NOTE_H_ */

